<template>
  <div class="app-container clearfix">  
    
<el-form ref="filterForm" :model="subscribeForm"  label-position="left" label-width="100px">
        <el-form-item label="渠道名称" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="分组" prop="channelName">
            <el-select v-model="subscribeForm.industryID" clearable placeholder="请选择">
              <el-option label="0" value="0">全部</el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="客服人员" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="员工添加上限" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="允许员工上下线" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="备用员工" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="客户标签" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="客户备注" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="客户描述" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="设置欢迎语" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="分时段欢迎语" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="欢迎语屏蔽" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="自动通过好友" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="二维码预览" prop="channelName">
          <el-input v-model="subscribeForm.channelName" placeholder="标题" />
        </el-form-item>
        <el-form-item label="备注" prop="channelRemark">
          <el-input v-model="subscribeForm.channelRemark" placeholder="备注" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleSubscribeSubmit()">确 定</el-button>
        <el-button type="primary" @click="handleSubscribeCannel()">取消</el-button>
      </span>
  </div>
</template>

<script>
import {saveChannel} from '@/api/customer/channel'



export default {
  name: 'channelAdmin',
  components: {  },
  directives: {  },
  filters: {
  },
  data() {
    return {
      subscribeForm: {
        gradeName: "",
        gradeLogo: "",
        remark: "",
        gradeStatus:6
      }
    }
  },
  created() {
  },
  destroyed () {
  },
  methods: {
    handleSubscribeSubmit:function(){
      let _this = this;
      saveChannel(_this.subscribeForm).then((response) => {
          if (response.code === 200) {
            _this.$router.push({ path: 'channel'})
          } else {
            _this.$message({
              message: response.msg,
              type: 'error'
            })
          }
      })
    },
    handleFilter() {
      this.filterForm.page = 1
      this.getList()
    },
    handleSubscribeCannel:function(){
            this.$router.push({ path: 'channel'})
    }
  }
}
</script>
<style>
.filter { float: left; width: 160px; padding: 20px; min-height: 600px; }
.article { float: left; width: 800px; }
.article-item { width: 800px; height: 200px; margin-right: 25px; }
.article-item-text { float: left; width:600px; }
.article-item-icon { float: right; width:200px; height:150px; padding-left: 50px; }
.article-item-icon img { width:100%; height:100%; border-radius: 10px; }
</style>